struct TreeNode {
  int val;
  TreeNode* left;
  TreeNode* right;
  TreeNode() : val(0), left(nullptr), right(nullptr) {}
  TreeNode(int val_) : val(val_), left(nullptr), right(nullptr) {}
  TreeNode(int val_, TreeNode* left_, TreeNode* right_)
      : val(val_), left(left_), right(right_) {}
};